package com.wgts.wgts.mvp.view.activity.awardmore;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.wgts.wgts.mvp.view.activity.guessing.MyGuessingFragment;

import java.util.List;

/*
 *
 *
 *   data:2018/10/1311:09
 *
 */public class AwardViewPageAdapter extends FragmentStatePagerAdapter {
    private List<String> list;
    public AwardViewPageAdapter(FragmentManager fm, List<String> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int i) {
        return AwardMoreFragment.getAwardMoreFragment(list.get(i));
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        //得到对应position的Fragment的title
        return list.get(position);
    }
}
